#ifndef CONSOLEMEDIATOR_H
#define CONSOLEMEDIATOR_H

#include <list>
#include <algorithm>
#include "Players.h"

using namespace std;
class DVDPlayer;
class VCRPlayer;
class CDPlayer;
class Player;

class ConsoleMediator
{
private:
	Player* currentPlayer;
	list<DVDPlayer*>	DVDPlayers;
	list<VCRPlayer*>	VCRPlayers;
	list<CDPlayer*>		CDPlayers;
	
	void deleteAllPlayers();

public:
	~ConsoleMediator()
	{
		deleteAllPlayers();
	}
	ConsoleMediator()
	{
		currentPlayer = 0;
	}

	void addDVDPlayer(DVDPlayer* dvdPlayer);
	void addVCRPlayer(VCRPlayer* vcrPlayer);
	void addCDPlayer(CDPlayer* cdPlayer);
	

	void DVDstart(DVDPlayer* dvdPlayer);
	void VCRstart(VCRPlayer* vcrPlayer);
	void CDstart(CDPlayer* cdPlayer);
	
	void DVDstop(DVDPlayer* dvdPlayer);
	void VCRstop(VCRPlayer* vcrPlayer);
	void CDstop(CDPlayer* cdPlayer);
	
	void DVDrewind(DVDPlayer* dvdPlayer);
	void VCRrewind(VCRPlayer* vcrPlayer);
	void CDrewind(CDPlayer* cdPlayer);

	void DVDforward(DVDPlayer* dvdPlayer);
	void VCRforward(VCRPlayer* vcrPlayer);
	void CDforward(CDPlayer* cdPlayer);
	
};

#endif //CONSOLEMEDIATOR_H